<?php
class VES_VendorsWarehouse_Block_Account_Edit_Tab_Warehouse extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    
  public function __construct()
    {
        $this->_controller = 'account_edit_tab_warehouse';
         $this->_blockGroup = 'vendorswarehouse';
        $this->_headerText = Mage::helper('vendorswarehouse')->__('Warehouse Manager');
        $this->_addButtonLabel = Mage::helper('vendorswarehouse')->__('Add Address');
         parent::__construct();
         $this->setTemplate('ves_vendorswarehouse/account/edit/tab/warehouse.phtml');
   }
 
   protected function _prepareLayout()
   {
//        $this->setChild('create_address',
//            $this->getLayout()->createBlock('adminhtml/widget_button')
//            ->setData(array(
//                'label' => Mage::helper('catalog')->__('Create Empty'),
//                'class' => 'add',
//                'onclick' => 'warehouse.createAddress()'
//            ))
//            );
          $this->setChild('details',
                $this->getLayout()->createBlock('vendorswarehouse/account_edit_tab_warehouse_details',
                    'vendorswarehouse_account_edit_tab_warehouse_details')
            );
       return parent::_prepareLayout();
   }
   public function getCreateAddressUrl()
   {
       return $this->getUrl('*/warehouse_address/save'
           );
   }
   
   /**
     * Retrieve Grid JavaScript object name
     *
     * @return string
     */
    public function getGridJsObject()
    {
        return $this->getChild('grid')->getJsObjectName();
    }
}